package com.cc.openeye.find

import androidx.compose.runtime.mutableStateOf
import com.cc.openeye.find.entity.find.FindDatEntity

class OpenEyeFindViewModel {

    private val openEyeViewModel by lazy {
        OpenEyeFindModel.newInstance()
    }

    val findData by lazy {
        mutableStateOf(FindDatEntity())
    }

    suspend fun requestFindData() {
        val response = openEyeViewModel.requestFindData()
        if (response.success && response.data != null) {
            findData.value = response.data!!
        }

    }

    companion object {
        fun newInstance() = OpenEyeFindViewModel()
    }

}
